﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HNCDataSetTableAdapters;
using System.Web.Routing;
using System.Data;

public partial class UserControl_content_project : System.Web.UI.UserControl
{
    CategoryTableAdapter cate = new CategoryTableAdapter();
    ProductsTableAdapter pro = new ProductsTableAdapter();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataView dv = (DataView)pro.GetProductByCateID(9).DefaultView;
            CollectionPager1.PageSize = 12;
            CollectionPager1.DataSource = dv;
            CollectionPager1.BindToControl = rptProduct;
            rptProduct.DataSource = CollectionPager1.DataSourcePaged;
            rptProduct.DataBind();
        }
    }
}